package com.company.cloud.acct.modules.api.service;


import com.company.cloud.acct.modules.api.fallback.AccountRemoteServiceFallbackFactory;
import com.company.cloud.acct.modules.api.request.AcctGetRequest;
import com.company.cloud.acct.modules.api.request.AcctOpRequest;
import com.company.cloud.acct.modules.api.response.AccountModel;
import com.company.cloud.common.bean.BaseClientResult;
import com.company.common.server.constant.ServiceNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(contextId = "acct1", name = ServiceNameConstant.acct_center, fallbackFactory = AccountRemoteServiceFallbackFactory.class)
public interface AccountRemoteService {

    /**账户操作*/
    @RequestMapping(value = "/remote/acct/opAcct", method = RequestMethod.POST)
    public BaseClientResult<String> opAcct(@RequestBody AcctOpRequest request);

    /**账户获取*/
    @RequestMapping(value = "/remote/acct/getAcct", method = RequestMethod.POST)
    public BaseClientResult<AccountModel> getAcct(@RequestBody AcctGetRequest request);



}
